package com.zzl.finance.order.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.zzl.apidoc.annotation.ApidocModel;
import com.zzl.apidoc.annotation.ApidocModelProperty;
import com.zzl.general.common.utils.DoubleSerialize;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author sunpp
 * @date 2021-11-26 19:40:12
 */
@Data
@ApidocModel
public class OrderPageDto implements Serializable {
    private static final long serialVersionUID = 1L;
    @ApidocModelProperty(description = "主键")
    private String id;
    @ApidocModelProperty(description = "订单编号")
    private String orderNo;
    @ApidocModelProperty(description = "凭证编号")
    private String ticketNo;
    @JsonSerialize(using = DoubleSerialize.class)
    @ApidocModelProperty(description = "订单总金额")
    private Double orderAmount;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApidocModelProperty(description = "生成时间", validate = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApidocModelProperty(description = "上联地址")
    private String chainAddress;
    @ApidocModelProperty(description = "处理状态")
    private Integer orderStatus;

    @ApidocModelProperty(description = "付款企业名称")
    private String paymentEnterpriseName;

    @ApidocModelProperty(description = "融资企业名称")
    private String financeEnterpriseName;

    @ApidocModelProperty(description = "订单状态字符串")
    @TableField(exist = false)
    private String orderStatusStr;

    @TableField(exist = false)
    @ApidocModelProperty(description = "操作按钮集合")
    private List<KeyValue> operateButton = new ArrayList<>();
}
